<template>
  <div class="hello">
    <h1>myth</h1>
   <ul v-for="text,index in arr" :key="index">
     <li>{{text}}</li>
   </ul>
   <input type="button" value="click" @click="ck"/>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      arr:["我是测试0","我是测试1","我是测试2","我是测试3"]
    }
  },
  methods:{
    ck(){
      console.log(1)
      this.arr.push("又加了一个")
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
